import request from '@/utils/request'
// 查询id
export function getInvoicingid(id) {
    return request({
      url: '/finance/kltInvoicing/'+id,
      method: 'get'
    })
  }
  // 查询list
export function getInvoicingList(query) {
  return request({
    url: '/finance/kltInvoicing/list',
    method: 'get',
    params: query
  })
}
// 查询所有数据
export function getAllInvoicing(query) {
  return request({
    url: '/finance/kltInvoicing/selectAll',
    method: 'get',
    params: query
  })
}

// 新增
export function getInvoicingInsert(data) {
  return request({
    url: '/finance/kltInvoicing',
    method: 'post',
    data: data
  })
}

// 修改
export function getInvoicingEdit(data) {
  return request({
    url: '/finance/kltInvoicing',
    method: 'put',
    data: data
  })
}


// 删除
export function getInvoicingDelete(data) {
  return request({
    url: '/finance/kltInvoicing?idList='+data,
    method: 'delete',
    
  })
}


// list
export function getInvoicingCount(data) {
  return request({
    url: '/finance/kltInvoicing/count',
    method: 'get',
    params:data
  })
}

export function getSalesOrderInvoicingById(data) {
  return request({
    url: '/finance/kltInvoicing/getSalesOrderInvoicingById',
    method: 'get',
    params:data
  })
}


export function saveInvoicingAndDetail(data) {
  return request({
    url: '/finance/kltInvoicing/saveInvoicingAndDetail',
    method: 'post',
    data:data
  })
}



  // 查询list
  export function getkltInvoicingDetailList(query) {
    return request({
      url: '/finance/kltInvoicingDetail/list',
      method: 'get',
      params: query
    })
  }
// 查询list
export function delInvoicing(query) {
  return request({
    url: '/finance/kltInvoicing/delInvoicing',
    method: 'get',
    params: query
  })
}

  